home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / g / gnu_c / info.lzh / INFO / GCC_INFO.19 < prev    next >
Encoding:
GNU Info File  |  1993-10-21  |  45.9 KB  |  1,038 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.54 from the input
  2. file gcc.texi.
  3.  
  4.    This file documents the use and the internals of the GNU compiler.
  5.  
  6.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  7.  
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.  
  12.    Permission is granted to copy and distribute modified versions of
  13. this manual under the conditions for verbatim copying, provided also
  14. that the sections entitled "GNU General Public License" and "Protect
  15. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  16. original, and provided that the entire resulting derived work is
  17. distributed under the terms of a permission notice identical to this
  18. one.
  19.  
  20.    Permission is granted to copy and distribute translations of this
  21. manual into another language, under the above conditions for modified
  22. versions, except that the sections entitled "GNU General Public
  23. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  24. permission notice, may be included in translations approved by the Free
  25. Software Foundation instead of in the original English.
  26.  
  27. File: gcc.info,  Node: Instruction Output,  Next: Dispatch Tables,  Prev: Macros for Initialization,  Up: Assembler Format
  28.  
  29. Output of Assembler Instructions
  30. --------------------------------
  31.  
  32. `REGISTER_NAMES'
  33.      A C initializer containing the assembler's names for the machine
  34.      registers, each one as a C string constant.  This is what
  35.      translates register numbers in the compiler into assembler
  36.      language.
  37.  
  38. `ADDITIONAL_REGISTER_NAMES'
  39.      If defined, a C initializer for an array of structures containing
  40.      a name and a register number.  This macro defines additional names
  41.      for hard registers, thus allowing the `asm' option in declarations
  42.      to refer to registers using alternate names.
  43.  
  44. `ASM_OUTPUT_OPCODE (STREAM, PTR)'
  45.      Define this macro if you are using an unusual assembler that
  46.      requires different names for the machine instructions.
  47.  
  48.      The definition is a C statement or statements which output an
  49.      assembler instruction opcode to the stdio stream STREAM.  The
  50.      macro-operand PTR is a variable of type `char *' which points to
  51.      the opcode name in its "internal" form--the form that is written
  52.      in the machine description.  The definition should output the
  53.      opcode name to STREAM, performing any translation you desire, and
  54.      increment the variable PTR to point at the end of the opcode so
  55.      that it will not be output twice.
  56.  
  57.      In fact, your macro definition may process less than the entire
  58.      opcode name, or more than the opcode name; but if you want to
  59.      process text that includes `%'-sequences to substitute operands,
  60.      you must take care of the substitution yourself.  Just be sure to
  61.      increment PTR over whatever text should not be output normally.
  62.  
  63.      If you need to look at the operand values, they can be found as the
  64.      elements of `recog_operand'.
  65.  
  66.      If the macro definition does nothing, the instruction is output in
  67.      the usual way.
  68.  
  69. `FINAL_PRESCAN_INSN (INSN, OPVEC, NOPERANDS)'
  70.      If defined, a C statement to be executed just prior to the output
  71.      of assembler code for INSN, to modify the extracted operands so
  72.      they will be output differently.
  73.  
  74.      Here the argument OPVEC is the vector containing the operands
  75.      extracted from INSN, and NOPERANDS is the number of elements of
  76.      the vector which contain meaningful data for this insn.  The
  77.      contents of this vector are what will be used to convert the insn
  78.      template into assembler code, so you can change the assembler
  79.      output by changing the contents of the vector.
  80.  
  81.      This macro is useful when various assembler syntaxes share a single
  82.      file of instruction patterns; by defining this macro differently,
  83.      you can cause a large class of instructions to be output
  84.      differently (such as with rearranged operands).  Naturally,
  85.      variations in assembler syntax affecting individual insn patterns
  86.      ought to be handled by writing conditional output routines in
  87.      those patterns.
  88.  
  89.      If this macro is not defined, it is equivalent to a null statement.
  90.  
  91. `PRINT_OPERAND (STREAM, X, CODE)'
  92.      A C compound statement to output to stdio stream STREAM the
  93.      assembler syntax for an instruction operand X.  X is an RTL
  94.      expression.
  95.  
  96.      CODE is a value that can be used to specify one of several ways of
  97.      printing the operand.  It is used when identical operands must be
  98.      printed differently depending on the context.  CODE comes from the
  99.      `%' specification that was used to request printing of the
  100.      operand.  If the specification was just `%DIGIT' then CODE is 0;
  101.      if the specification was `%LTR DIGIT' then CODE is the ASCII code
  102.      for LTR.
  103.  
  104.      If X is a register, this macro should print the register's name.
  105.      The names can be found in an array `reg_names' whose type is `char
  106.      *[]'.  `reg_names' is initialized from `REGISTER_NAMES'.
  107.  
  108.      When the machine description has a specification `%PUNCT' (a `%'
  109.      followed by a punctuation character), this macro is called with a
  110.      null pointer for X and the punctuation character for CODE.
  111.  
  112. `PRINT_OPERAND_PUNCT_VALID_P (CODE)'
  113.      A C expression which evaluates to true if CODE is a valid
  114.      punctuation character for use in the `PRINT_OPERAND' macro.  If
  115.      `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no
  116.      punctuation characters (except for the standard one, `%') are used
  117.      in this way.
  118.  
  119. `PRINT_OPERAND_ADDRESS (STREAM, X)'
  120.      A C compound statement to output to stdio stream STREAM the
  121.      assembler syntax for an instruction operand that is a memory
  122.      reference whose address is X.  X is an RTL expression.
  123.  
  124.      On some machines, the syntax for a symbolic address depends on the
  125.      section that the address refers to.  On these machines, define the
  126.      macro `ENCODE_SECTION_INFO' to store the information into the
  127.      `symbol_ref', and then check for it here.  *Note Assembler
  128.      Format::.
  129.  
  130. `DBR_OUTPUT_SEQEND(FILE)'
  131.      A C statement, to be executed after all slot-filler instructions
  132.      have been output.  If necessary, call `dbr_sequence_length' to
  133.      determine the number of slots filled in a sequence (zero if not
  134.      currently outputting a sequence), to decide how many no-ops to
  135.      output, or whatever.
  136.  
  137.      Don't define this macro if it has nothing to do, but it is helpful
  138.      in reading assembly output if the extent of the delay sequence is
  139.      made explicit (e.g. with white space).
  140.  
  141.      Note that output routines for instructions with delay slots must be
  142.      prepared to deal with not being output as part of a sequence (i.e.
  143.      when the scheduling pass is not run, or when no slot fillers could
  144.      be found.)  The variable `final_sequence' is null when not
  145.      processing a sequence, otherwise it contains the `sequence' rtx
  146.      being output.
  147.  
  148. `REGISTER_PREFIX'
  149. `LOCAL_LABEL_PREFIX'
  150. `USER_LABEL_PREFIX'
  151. `IMMEDIATE_PREFIX'
  152.      If defined, C string expressions to be used for the `%R', `%L',
  153.      `%U', and `%I' options of `asm_fprintf' (see `final.c').  These
  154.      are useful when a single `md' file must support multiple assembler
  155.      formats.  In that case, the various `tm.h' files can define these
  156.      macros differently.
  157.  
  158. `ASM_OUTPUT_REG_PUSH (STREAM, REGNO)'
  159.      A C expression to output to STREAM some assembler code which will
  160.      push hard register number REGNO onto the stack.  The code need not
  161.      be optimal, since this macro is used only when profiling.
  162.  
  163. `ASM_OUTPUT_REG_POP (STREAM, REGNO)'
  164.      A C expression to output to STREAM some assembler code which will
  165.      pop hard register number REGNO off of the stack.  The code need
  166.      not be optimal, since this macro is used only when profiling.
  167.  
  168. File: gcc.info,  Node: Dispatch Tables,  Next: Alignment Output,  Prev: Instruction Output,  Up: Assembler Format
  169.  
  170. Output of Dispatch Tables
  171. -------------------------
  172.  
  173. `ASM_OUTPUT_ADDR_DIFF_ELT (STREAM, VALUE, REL)'
  174.      This macro should be provided on machines where the addresses in a
  175.      dispatch table are relative to the table's own address.
  176.  
  177.      The definition should be a C statement to output to the stdio
  178.      stream STREAM an assembler pseudo-instruction to generate a
  179.      difference between two labels.  VALUE and REL are the numbers of
  180.      two internal labels.  The definitions of these labels are output
  181.      using `ASM_OUTPUT_INTERNAL_LABEL', and they must be printed in the
  182.      same way here.  For example,
  183.  
  184.           fprintf (STREAM, "\t.word L%d-L%d\n",
  185.                    VALUE, REL)
  186.  
  187. `ASM_OUTPUT_ADDR_VEC_ELT (STREAM, VALUE)'
  188.      This macro should be provided on machines where the addresses in a
  189.      dispatch table are absolute.
  190.  
  191.      The definition should be a C statement to output to the stdio
  192.      stream STREAM an assembler pseudo-instruction to generate a
  193.      reference to a label.  VALUE is the number of an internal label
  194.      whose definition is output using `ASM_OUTPUT_INTERNAL_LABEL'.  For
  195.      example,
  196.  
  197.           fprintf (STREAM, "\t.word L%d\n", VALUE)
  198.  
  199. `ASM_OUTPUT_CASE_LABEL (STREAM, PREFIX, NUM, TABLE)'
  200.      Define this if the label before a jump-table needs to be output
  201.      specially.  The first three arguments are the same as for
  202.      `ASM_OUTPUT_INTERNAL_LABEL'; the fourth argument is the jump-table
  203.      which follows (a `jump_insn' containing an `addr_vec' or
  204.      `addr_diff_vec').
  205.  
  206.      This feature is used on system V to output a `swbeg' statement for
  207.      the table.
  208.  
  209.      If this macro is not defined, these labels are output with
  210.      `ASM_OUTPUT_INTERNAL_LABEL'.
  211.  
  212. `ASM_OUTPUT_CASE_END (STREAM, NUM, TABLE)'
  213.      Define this if something special must be output at the end of a
  214.      jump-table.  The definition should be a C statement to be executed
  215.      after the assembler code for the table is written.  It should write
  216.      the appropriate code to stdio stream STREAM.  The argument TABLE
  217.      is the jump-table insn, and NUM is the label-number of the
  218.      preceding label.
  219.  
  220.      If this macro is not defined, nothing special is output at the end
  221.      of the jump-table.
  222.  
  223. File: gcc.info,  Node: Alignment Output,  Prev: Dispatch Tables,  Up: Assembler Format
  224.  
  225. Assembler Commands for Alignment
  226. --------------------------------
  227.  
  228. `ASM_OUTPUT_ALIGN_CODE (FILE)'
  229.      A C expression to output text to align the location counter in the
  230.      way that is desirable at a point in the code that is reached only
  231.      by jumping.
  232.  
  233.      This macro need not be defined if you don't want any special
  234.      alignment to be done at such a time.  Most machine descriptions do
  235.      not currently define the macro.
  236.  
  237. `ASM_OUTPUT_LOOP_ALIGN (FILE)'
  238.      A C expression to output text to align the location counter in the
  239.      way that is desirable at the beginning of a loop.
  240.  
  241.      This macro need not be defined if you don't want any special
  242.      alignment to be done at such a time.  Most machine descriptions do
  243.      not currently define the macro.
  244.  
  245. `ASM_OUTPUT_SKIP (STREAM, NBYTES)'
  246.      A C statement to output to the stdio stream STREAM an assembler
  247.      instruction to advance the location counter by NBYTES bytes.
  248.      Those bytes should be zero when loaded.  NBYTES will be a C
  249.      expression of type `int'.
  250.  
  251. `ASM_NO_SKIP_IN_TEXT'
  252.      Define this macro if `ASM_OUTPUT_SKIP' should not be used in the
  253.      text section because it fails put zeros in the bytes that are
  254.      skipped.  This is true on many Unix systems, where the pseudo-op
  255.      to skip bytes produces no-op instructions rather than zeros when
  256.      used in the text section.
  257.  
  258. `ASM_OUTPUT_ALIGN (STREAM, POWER)'
  259.      A C statement to output to the stdio stream STREAM an assembler
  260.      command to advance the location counter to a multiple of 2 to the
  261.      POWER bytes.  POWER will be a C expression of type `int'.
  262.  
  263. File: gcc.info,  Node: Debugging Info,  Next: Cross-compilation,  Prev: Assembler Format,  Up: Target Macros
  264.  
  265. Controlling Debugging Information Format
  266. ========================================
  267.  
  268. * Menu:
  269.  
  270. * All Debuggers::      Macros that affect all debugging formats uniformly.
  271. * DBX Options::        Macros enabling specific options in DBX format.
  272. * DBX Hooks::          Hook macros for varying DBX format.
  273. * File Names and DBX:: Macros controlling output of file names in DBX format.
  274. * SDB and DWARF::      Macros for SDB (COFF) and DWARF formats.
  275.  
  276. File: gcc.info,  Node: All Debuggers,  Next: DBX Options,  Up: Debugging Info
  277.  
  278. Macros Affecting All Debugging Formats
  279. --------------------------------------
  280.  
  281. `DBX_REGISTER_NUMBER (REGNO)'
  282.      A C expression that returns the DBX register number for the
  283.      compiler register number REGNO.  In simple cases, the value of this
  284.      expression may be REGNO itself.  But sometimes there are some
  285.      registers that the compiler knows about and DBX does not, or vice
  286.      versa.  In such cases, some register may need to have one number in
  287.      the compiler and another for DBX.
  288.  
  289.      If two registers have consecutive numbers inside GNU CC, and they
  290.      can be used as a pair to hold a multiword value, then they *must*
  291.      have consecutive numbers after renumbering with
  292.      `DBX_REGISTER_NUMBER'.  Otherwise, debuggers will be unable to
  293.      access such a pair, because they expect register pairs to be
  294.      consecutive in their own numbering scheme.
  295.  
  296.      If you find yourself defining `DBX_REGISTER_NUMBER' in way that
  297.      does not preserve register pairs, then what you must do instead is
  298.      redefine the actual register numbering scheme.
  299.  
  300. `DEBUGGER_AUTO_OFFSET (X)'
  301.      A C expression that returns the integer offset value for an
  302.      automatic variable having address X (an RTL expression).  The
  303.      default computation assumes that X is based on the frame-pointer
  304.      and gives the offset from the frame-pointer.  This is required for
  305.      targets that produce debugging output for DBX or COFF-style
  306.      debugging output for SDB and allow the frame-pointer to be
  307.      eliminated when the `-g' options is used.
  308.  
  309. `DEBUGGER_ARG_OFFSET (OFFSET, X)'
  310.      A C expression that returns the integer offset value for an
  311.      argument having address X (an RTL expression).  The nominal offset
  312.      is OFFSET.
  313.  
  314. File: gcc.info,  Node: DBX Options,  Next: DBX Hooks,  Prev: All Debuggers,  Up: Debugging Info
  315.  
  316. Specific Options for DBX Output
  317. -------------------------------
  318.  
  319. `DBX_DEBUGGING_INFO'
  320.      Define this macro if GNU CC should produce debugging output for DBX
  321.      in response to the `-g' option.
  322.  
  323. `XCOFF_DEBUGGING_INFO'
  324.      Define this macro if GNU CC should produce XCOFF format debugging
  325.      output in response to the `-g' option.  This is a variant of DBX
  326.      format.
  327.  
  328. `DEFAULT_GDB_EXTENSIONS'
  329.      Define this macro to control whether GNU CC should by default
  330.      generate GDB's extended version of DBX debugging information
  331.      (assuming DBX-format debugging information is enabled at all).  If
  332.      you don't define the macro, the default is 1: always generate the
  333.      extended information if there is any occasion to.
  334.  
  335. `DEBUG_SYMS_TEXT'
  336.      Define this macro if all `.stabs' commands should be output while
  337.      in the text section.
  338.  
  339. `ASM_STABS_OP'
  340.      A C string constant naming the assembler pseudo op to use instead
  341.      of `.stabs' to define an ordinary debugging symbol.  If you don't
  342.      define this macro, `.stabs' is used.  This macro applies only to
  343.      DBX debugging information format.
  344.  
  345. `ASM_STABD_OP'
  346.      A C string constant naming the assembler pseudo op to use instead
  347.      of `.stabd' to define a debugging symbol whose value is the current
  348.      location.  If you don't define this macro, `.stabd' is used.  This
  349.      macro applies only to DBX debugging information format.
  350.  
  351. `ASM_STABN_OP'
  352.      A C string constant naming the assembler pseudo op to use instead
  353.      of `.stabn' to define a debugging symbol with no name.  If you
  354.      don't define this macro, `.stabn' is used.  This macro applies
  355.      only to DBX debugging information format.
  356.  
  357. `DBX_NO_XREFS'
  358.      Define this macro if DBX on your system does not support the
  359.      construct `xsTAGNAME'.  On some systems, this construct is used to
  360.      describe a forward reference to a structure named TAGNAME.  On
  361.      other systems, this construct is not supported at all.
  362.  
  363. `DBX_CONTIN_LENGTH'
  364.      A symbol name in DBX-format debugging information is normally
  365.      continued (split into two separate `.stabs' directives) when it
  366.      exceeds a certain length (by default, 80 characters).  On some
  367.      operating systems, DBX requires this splitting; on others,
  368.      splitting must not be done.  You can inhibit splitting by defining
  369.      this macro with the value zero.  You can override the default
  370.      splitting-length by defining this macro as an expression for the
  371.      length you desire.
  372.  
  373. `DBX_CONTIN_CHAR'
  374.      Normally continuation is indicated by adding a `\' character to
  375.      the end of a `.stabs' string when a continuation follows.  To use
  376.      a different character instead, define this macro as a character
  377.      constant for the character you want to use.  Do not define this
  378.      macro if backslash is correct for your system.
  379.  
  380. `DBX_STATIC_STAB_DATA_SECTION'
  381.      Define this macro if it is necessary to go to the data section
  382.      before outputting the `.stabs' pseudo-op for a non-global static
  383.      variable.
  384.  
  385. `DBX_TYPE_DECL_STABS_CODE'
  386.      The value to use in the "code" field of the `.stabs' directive for
  387.      a typedef.  The default is `N_LSYM'.
  388.  
  389. `DBX_STATIC_CONST_VAR_CODE'
  390.      The value to use in the "code" field of the `.stabs' directive for
  391.      a static variable located in the text section.  DBX format does not
  392.      provide any "right" way to do this.  The default is `N_FUN'.
  393.  
  394. `DBX_REGPARM_STABS_CODE'
  395.      The value to use in the "code" field of the `.stabs' directive for
  396.      a parameter passed in registers.  DBX format does not provide any
  397.      "right" way to do this.  The default is `N_RSYM'.
  398.  
  399. `DBX_REGPARM_STABS_LETTER'
  400.      The letter to use in DBX symbol data to identify a symbol as a
  401.      parameter passed in registers.  DBX format does not customarily
  402.      provide any way to do this.  The default is `'P''.
  403.  
  404. `DBX_MEMPARM_STABS_LETTER'
  405.      The letter to use in DBX symbol data to identify a symbol as a
  406.      stack parameter.  The default is `'p''.
  407.  
  408. `DBX_FUNCTION_FIRST'
  409.      Define this macro if the DBX information for a function and its
  410.      arguments should precede the assembler code for the function.
  411.      Normally, in DBX format, the debugging information entirely
  412.      follows the assembler code.
  413.  
  414. `DBX_LBRAC_FIRST'
  415.      Define this macro if the `N_LBRAC' symbol for a block should
  416.      precede the debugging information for variables and functions
  417.      defined in that block.  Normally, in DBX format, the `N_LBRAC'
  418.      symbol comes first.
  419.  
  420. File: gcc.info,  Node: DBX Hooks,  Next: File Names and DBX,  Prev: DBX Options,  Up: Debugging Info
  421.  
  422. Open-Ended Hooks for DBX Format
  423. -------------------------------
  424.  
  425. `DBX_OUTPUT_LBRAC (STREAM, NAME)'
  426.      Define this macro to say how to output to STREAM the debugging
  427.      information for the start of a scope level for variable names.  The
  428.      argument NAME is the name of an assembler symbol (for use with
  429.      `assemble_name') whose value is the address where the scope begins.
  430.  
  431. `DBX_OUTPUT_RBRAC (STREAM, NAME)'
  432.      Like `DBX_OUTPUT_LBRAC', but for the end of a scope level.
  433.  
  434. `DBX_OUTPUT_ENUM (STREAM, TYPE)'
  435.      Define this macro if the target machine requires special handling
  436.      to output an enumeration type.  The definition should be a C
  437.      statement (sans semicolon) to output the appropriate information
  438.      to STREAM for the type TYPE.
  439.  
  440. `DBX_OUTPUT_FUNCTION_END (STREAM, FUNCTION)'
  441.      Define this macro if the target machine requires special output at
  442.      the end of the debugging information for a function.  The
  443.      definition should be a C statement (sans semicolon) to output the
  444.      appropriate information to STREAM.  FUNCTION is the
  445.      `FUNCTION_DECL' node for the function.
  446.  
  447. `DBX_OUTPUT_STANDARD_TYPES (SYMS)'
  448.      Define this macro if you need to control the order of output of the
  449.      standard data types at the beginning of compilation.  The argument
  450.      SYMS is a `tree' which is a chain of all the predefined global
  451.      symbols, including names of data types.
  452.  
  453.      Normally, DBX output starts with definitions of the types for
  454.      integers and characters, followed by all the other predefined
  455.      types of the particular language in no particular order.
  456.  
  457.      On some machines, it is necessary to output different particular
  458.      types first.  To do this, define `DBX_OUTPUT_STANDARD_TYPES' to
  459.      output those symbols in the necessary order.  Any predefined types
  460.      that you don't explicitly output will be output afterward in no
  461.      particular order.
  462.  
  463.      Be careful not to define this macro so that it works only for C.
  464.      There are no global variables to access most of the built-in
  465.      types, because another language may have another set of types.
  466.      The way to output a particular type is to look through SYMS to see
  467.      if you can find it.  Here is an example:
  468.  
  469.           {
  470.             tree decl;
  471.             for (decl = syms; decl; decl = TREE_CHAIN (decl))
  472.               if (!strcmp (IDENTIFIER_POINTER (DECL_NAME (decl)),
  473.                            "long int"))
  474.                 dbxout_symbol (decl);
  475.             ...
  476.           }
  477.  
  478.      This does nothing if the expected type does not exist.
  479.  
  480.      See the function `init_decl_processing' in `c-decl.c' to find the
  481.      names to use for all the built-in C types.
  482.  
  483.      Here is another way of finding a particular type:
  484.  
  485.           {
  486.             tree decl;
  487.             for (decl = syms; decl; decl = TREE_CHAIN (decl))
  488.               if (TREE_CODE (decl) == TYPE_DECL
  489.                   && (TREE_CODE (TREE_TYPE (decl))
  490.                       == INTEGER_CST)
  491.                   && TYPE_PRECISION (TREE_TYPE (decl)) == 16
  492.                   && TYPE_UNSIGNED (TREE_TYPE (decl)))
  493.                 /* This must be `unsigned short'.  */
  494.                 dbxout_symbol (decl);
  495.             ...
  496.           }
  497.  
  498. File: gcc.info,  Node: File Names and DBX,  Next: SDB and DWARF,  Prev: DBX Hooks,  Up: Debugging Info
  499.  
  500. File Names in DBX Format
  501. ------------------------
  502.  
  503. `DBX_WORKING_DIRECTORY'
  504.      Define this if DBX wants to have the current directory recorded in
  505.      each object file.
  506.  
  507.      Note that the working directory is always recorded if GDB
  508.      extensions are enabled.
  509.  
  510. `DBX_OUTPUT_MAIN_SOURCE_FILENAME (STREAM, NAME)'
  511.      A C statement to output DBX debugging information to the stdio
  512.      stream STREAM which indicates that file NAME is the main source
  513.      file--the file specified as the input file for compilation.  This
  514.      macro is called only once, at the beginning of compilation.
  515.  
  516.      This macro need not be defined if the standard form of output for
  517.      DBX debugging information is appropriate.
  518.  
  519. `DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (STREAM, NAME)'
  520.      A C statement to output DBX debugging information to the stdio
  521.      stream STREAM which indicates that the current directory during
  522.      compilation is named NAME.
  523.  
  524.      This macro need not be defined if the standard form of output for
  525.      DBX debugging information is appropriate.
  526.  
  527. `DBX_OUTPUT_MAIN_SOURCE_FILE_END (STREAM, NAME)'
  528.      A C statement to output DBX debugging information at the end of
  529.      compilation of the main source file NAME.
  530.  
  531.      If you don't define this macro, nothing special is output at the
  532.      end of compilation, which is correct for most machines.
  533.  
  534. `DBX_OUTPUT_SOURCE_FILENAME (STREAM, NAME)'
  535.      A C statement to output DBX debugging information to the stdio
  536.      stream STREAM which indicates that file NAME is the current source
  537.      file.  This output is generated each time input shifts to a
  538.      different source file as a result of `#include', the end of an
  539.      included file, or a `#line' command.
  540.  
  541.      This macro need not be defined if the standard form of output for
  542.      DBX debugging information is appropriate.
  543.  
  544. File: gcc.info,  Node: SDB and DWARF,  Prev: File Names and DBX,  Up: Debugging Info
  545.  
  546. Macros for SDB and DWARF Output
  547. -------------------------------
  548.  
  549. `SDB_DEBUGGING_INFO'
  550.      Define this macro if GNU CC should produce COFF-style debugging
  551.      output for SDB in response to the `-g' option.
  552.  
  553. `DWARF_DEBUGGING_INFO'
  554.      Define this macro if GNU CC should produce dwarf format debugging
  555.      output in response to the `-g' option.
  556.  
  557. `PUT_SDB_...'
  558.      Define these macros to override the assembler syntax for the
  559.      special SDB assembler directives.  See `sdbout.c' for a list of
  560.      these macros and their arguments.  If the standard syntax is used,
  561.      you need not define them yourself.
  562.  
  563. `SDB_DELIM'
  564.      Some assemblers do not support a semicolon as a delimiter, even
  565.      between SDB assembler directives.  In that case, define this macro
  566.      to be the delimiter to use (usually `\n').  It is not necessary to
  567.      define a new set of `PUT_SDB_OP' macros if this is the only change
  568.      required.
  569.  
  570. `SDB_GENERATE_FAKE'
  571.      Define this macro to override the usual method of constructing a
  572.      dummy name for anonymous structure and union types.  See
  573.      `sdbout.c' for more information.
  574.  
  575. `SDB_ALLOW_UNKNOWN_REFERENCES'
  576.      Define this macro to allow references to unknown structure, union,
  577.      or enumeration tags to be emitted.  Standard COFF does not allow
  578.      handling of unknown references, MIPS ECOFF has support for it.
  579.  
  580. `SDB_ALLOW_FORWARD_REFERENCES'
  581.      Define this macro to allow references to structure, union, or
  582.      enumeration tags that have not yet been seen to be handled.  Some
  583.      assemblers choke if forward tags are used, while some require it.
  584.  
  585. File: gcc.info,  Node: Cross-compilation,  Next: Misc,  Prev: Debugging Info,  Up: Target Macros
  586.  
  587. Cross Compilation and Floating Point Format
  588. ===========================================
  589.  
  590.    While all modern machines use 2's complement representation for
  591. integers, there are a variety of representations for floating point
  592. numbers.  This means that in a cross-compiler the representation of
  593. floating point numbers in the compiled program may be different from
  594. that used in the machine doing the compilation.
  595.  
  596.    Because different representation systems may offer different amounts
  597. of range and precision, the cross compiler cannot safely use the host
  598. machine's floating point arithmetic.  Therefore, floating point
  599. constants must be represented in the target machine's format.  This
  600. means that the cross compiler cannot use `atof' to parse a floating
  601. point constant; it must have its own special routine to use instead.
  602. Also, constant folding must emulate the target machine's arithmetic (or
  603. must not be done at all).
  604.  
  605.    The macros in the following table should be defined only if you are
  606. cross compiling between different floating point formats.
  607.  
  608.    Otherwise, don't define them.  Then default definitions will be set
  609. up which use `double' as the data type, `==' to test for equality, etc.
  610.  
  611.    You don't need to worry about how many times you use an operand of
  612. any of these macros.  The compiler never uses operands which have side
  613. effects.
  614.  
  615. `REAL_VALUE_TYPE'
  616.      A macro for the C data type to be used to hold a floating point
  617.      value in the target machine's format.  Typically this would be a
  618.      `struct' containing an array of `int'.
  619.  
  620. `REAL_VALUES_EQUAL (X, Y)'
  621.      A macro for a C expression which compares for equality the two
  622.      values, X and Y, both of type `REAL_VALUE_TYPE'.
  623.  
  624. `REAL_VALUES_LESS (X, Y)'
  625.      A macro for a C expression which tests whether X is less than Y,
  626.      both values being of type `REAL_VALUE_TYPE' and interpreted as
  627.      floating point numbers in the target machine's representation.
  628.  
  629. `REAL_VALUE_LDEXP (X, SCALE)'
  630.      A macro for a C expression which performs the standard library
  631.      function `ldexp', but using the target machine's floating point
  632.      representation.  Both X and the value of the expression have type
  633.      `REAL_VALUE_TYPE'.  The second argument, SCALE, is an integer.
  634.  
  635. `REAL_VALUE_FIX (X)'
  636.      A macro whose definition is a C expression to convert the
  637.      target-machine floating point value X to a signed integer.  X has
  638.      type `REAL_VALUE_TYPE'.
  639.  
  640. `REAL_VALUE_UNSIGNED_FIX (X)'
  641.      A macro whose definition is a C expression to convert the
  642.      target-machine floating point value X to an unsigned integer.  X
  643.      has type `REAL_VALUE_TYPE'.
  644.  
  645. `REAL_VALUE_RNDZINT (X)'
  646.      A macro whose definition is a C expression to round the
  647.      target-machine floating point value X towards zero to an integer
  648.      value (but still as a floating point number).  X has type
  649.      `REAL_VALUE_TYPE', and so does the value.
  650.  
  651. `REAL_VALUE_UNSIGNED_RNDZINT (X)'
  652.      A macro whose definition is a C expression to round the
  653.      target-machine floating point value X towards zero to an unsigned
  654.      integer value (but still represented as a floating point number).
  655.      x has type `REAL_VALUE_TYPE', and so does the value.
  656.  
  657. `REAL_VALUE_ATOF (STRING, MODE)'
  658.      A macro for a C expression which converts STRING, an expression of
  659.      type `char *', into a floating point number in the target machine's
  660.      representation for mode MODE.  The value has type
  661.      `REAL_VALUE_TYPE'.
  662.  
  663. `REAL_INFINITY'
  664.      Define this macro if infinity is a possible floating point value,
  665.      and therefore division by 0 is legitimate.
  666.  
  667. `REAL_VALUE_ISINF (X)'
  668.      A macro for a C expression which determines whether X, a floating
  669.      point value, is infinity.  The value has type `int'.  By default,
  670.      this is defined to call `isinf'.
  671.  
  672. `REAL_VALUE_ISNAN (X)'
  673.      A macro for a C expression which determines whether X, a floating
  674.      point value, is a "nan" (not-a-number).  The value has type `int'.
  675.      By default, this is defined to call `isnan'.
  676.  
  677.    Define the following additional macros if you want to make floating
  678. point constant folding work while cross compiling.  If you don't define
  679. them, cross compilation is still possible, but constant folding will
  680. not happen for floating point values.
  681.  
  682. `REAL_ARITHMETIC (OUTPUT, CODE, X, Y)'
  683.      A macro for a C statement which calculates an arithmetic operation
  684.      of the two floating point values X and Y, both of type
  685.      `REAL_VALUE_TYPE' in the target machine's representation, to
  686.      produce a result of the same type and representation which is
  687.      stored in OUTPUT (which will be a variable).
  688.  
  689.      The operation to be performed is specified by CODE, a tree code
  690.      which will always be one of the following: `PLUS_EXPR',
  691.      `MINUS_EXPR', `MULT_EXPR', `RDIV_EXPR', `MAX_EXPR', `MIN_EXPR'.
  692.  
  693.      The expansion of this macro is responsible for checking for
  694.      overflow.  If overflow happens, the macro expansion should execute
  695.      the statement `return 0;', which indicates the inability to
  696.      perform the arithmetic operation requested.
  697.  
  698. `REAL_VALUE_NEGATE (X)'
  699.      A macro for a C expression which returns the negative of the
  700.      floating point value X.  Both X and the value of the expression
  701.      have type `REAL_VALUE_TYPE' and are in the target machine's
  702.      floating point representation.
  703.  
  704.      There is no way for this macro to report overflow, since overflow
  705.      can't happen in the negation operation.
  706.  
  707. `REAL_VALUE_TRUNCATE (MODE, X)'
  708.      A macro for a C expression which converts the floating point value
  709.      X to mode MODE.
  710.  
  711.      Both X and the value of the expression are in the target machine's
  712.      floating point representation and have type `REAL_VALUE_TYPE'.
  713.      However, the value should have an appropriate bit pattern to be
  714.      output properly as a floating constant whose precision accords
  715.      with mode MODE.
  716.  
  717.      There is no way for this macro to report overflow.
  718.  
  719. `REAL_VALUE_TO_INT (LOW, HIGH, X)'
  720.      A macro for a C expression which converts a floating point value X
  721.      into a double-precision integer which is then stored into LOW and
  722.      HIGH, two variables of type INT.
  723.  
  724. `REAL_VALUE_FROM_INT (X, LOW, HIGH)'
  725.      A macro for a C expression which converts a double-precision
  726.      integer found in LOW and HIGH, two variables of type INT, into a
  727.      floating point value which is then stored into X.
  728.  
  729. File: gcc.info,  Node: Misc,  Prev: Cross-compilation,  Up: Target Macros
  730.  
  731. Miscellaneous Parameters
  732. ========================
  733.  
  734. `PREDICATE_CODES'
  735.      Optionally define this if you have added predicates to
  736.      `MACHINE.c'.  This macro is called within an initializer of an
  737.      array of structures.  The first field in the structure is the name
  738.      of a predicate and the second field is an array of rtl codes.  For
  739.      each predicate, list all rtl codes that can be in expressions
  740.      matched by the predicate.  The list should have a trailing comma.
  741.      Here is an example of two entries in the list for a typical RISC
  742.      machine:
  743.  
  744.           #define PREDICATE_CODES \
  745.             {"gen_reg_rtx_operand", {SUBREG, REG}},  \
  746.             {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}},
  747.  
  748.      Defining this macro does not affect the generated code (however,
  749.      incorrect definitions that omit an rtl code that may be matched by
  750.      the predicate can cause the compiler to malfunction).  Instead, it
  751.      allows the table built by `genrecog' to be more compact and
  752.      efficient, thus speeding up the compiler.  The most important
  753.      predicates to include in the list specified by this macro are
  754.      thoses used in the most insn patterns.
  755.  
  756. `CASE_VECTOR_MODE'
  757.      An alias for a machine mode name.  This is the machine mode that
  758.      elements of a jump-table should have.
  759.  
  760. `CASE_VECTOR_PC_RELATIVE'
  761.      Define this macro if jump-tables should contain relative addresses.
  762.  
  763. `CASE_DROPS_THROUGH'
  764.      Define this if control falls through a `case' insn when the index
  765.      value is out of range.  This means the specified default-label is
  766.      actually ignored by the `case' insn proper.
  767.  
  768. `CASE_VALUES_THRESHOLD'
  769.      Define this to be the smallest number of different values for
  770.      which it is best to use a jump-table instead of a tree of
  771.      conditional branches.  The default is four for machines with a
  772.      `casesi' instruction and five otherwise.  This is best for most
  773.      machines.
  774.  
  775. `BYTE_LOADS_ZERO_EXTEND'
  776.      Define this macro if an instruction to load a value narrower than a
  777.      word from memory into a register also zero-extends the value to
  778.      the whole register.
  779.  
  780. `BYTE_LOADS_SIGN_EXTEND'
  781.      Define this macro if an instruction to load a value narrower than a
  782.      word from memory into a register also sign-extends the value to
  783.      the whole register.
  784.  
  785. `IMPLICIT_FIX_EXPR'
  786.      An alias for a tree code that should be used by default for
  787.      conversion of floating point values to fixed point.  Normally,
  788.      `FIX_ROUND_EXPR' is used.
  789.  
  790. `FIXUNS_TRUNC_LIKE_FIX_TRUNC'
  791.      Define this macro if the same instructions that convert a floating
  792.      point number to a signed fixed point number also convert validly
  793.      to an unsigned one.
  794.  
  795. `EASY_DIV_EXPR'
  796.      An alias for a tree code that is the easiest kind of division to
  797.      compile code for in the general case.  It may be `TRUNC_DIV_EXPR',
  798.      `FLOOR_DIV_EXPR', `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'.  These four
  799.      division operators differ in how they round the result to an
  800.      integer.  `EASY_DIV_EXPR' is used when it is permissible to use
  801.      any of those kinds of division and the choice should be made on
  802.      the basis of efficiency.
  803.  
  804. `MOVE_MAX'
  805.      The maximum number of bytes that a single instruction can move
  806.      quickly from memory to memory.
  807.  
  808. `SHIFT_COUNT_TRUNCATED'
  809.      Defining this macro causes the compiler to omit a sign-extend,
  810.      zero-extend, or bitwise `and' instruction that truncates the count
  811.      of a shift operation to a width equal to the number of bits needed
  812.      to represent the size of the object being shifted.  On machines
  813.      that have instructions that act on bitfields at variable
  814.      positions, which may include `bit test' instructions, defining
  815.      `SHIFT_COUNT_TRUNCATED' also enables deletion of truncations of
  816.      the values that serve as arguments to bitfield instructions.
  817.  
  818.      If both types of instructions truncate the count (for shifts) and
  819.      position (for bitfield operations), or if no variable-position
  820.      bitfield instructions exist, you should define this macro.
  821.  
  822.      However, on some machines, such as the 80386 and the 680x0,
  823.      truncation only applies to shift operations and not the (real or
  824.      pretended) bitfield operations.  Do not define
  825.      `SHIFT_COUNT_TRUNCATED' on such machines.  Instead, add patterns
  826.      to the `md' file that include the implied truncation of the shift
  827.      instructions.
  828.  
  829. `TRULY_NOOP_TRUNCATION (OUTPREC, INPREC)'
  830.      A C expression which is nonzero if on this machine it is safe to
  831.      "convert" an integer of INPREC bits to one of OUTPREC bits (where
  832.      OUTPREC is smaller than INPREC) by merely operating on it as if it
  833.      had only OUTPREC bits.
  834.  
  835.      On many machines, this expression can be 1.
  836.  
  837.      When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for
  838.      modes for which `MODES_TIEABLE_P' is 0, suboptimal code can result.
  839.      If this is the case, making `TRULY_NOOP_TRUNCATION' return 0 in
  840.      such cases may improve things.
  841.  
  842. `STORE_FLAG_VALUE'
  843.      A C expression describing the value returned by a comparison
  844.      operator with an integral mode and stored by a store-flag
  845.      instruction (`sCOND') when the condition is true.  This
  846.      description must apply to *all* the `sCOND' patterns and all the
  847.      comparison operators whose results have a `MODE_INT' mode.
  848.  
  849.      A value of 1 or -1 means that the instruction implementing the
  850.      comparison operator returns exactly 1 or -1 when the comparison is
  851.      true and 0 when the comparison is false.  Otherwise, the value
  852.      indicates which bits of the result are guaranteed to be 1 when the
  853.      comparison is true.  This value is interpreted in the mode of the
  854.      comparison operation, which is given by the mode of the first
  855.      operand in the `sCOND' pattern.  Either the low bit or the sign
  856.      bit of `STORE_FLAG_VALUE' be on.  Presently, only those bits are
  857.      used by the compiler.
  858.  
  859.      If `STORE_FLAG_VALUE' is neither 1 or -1, the compiler will
  860.      generate code that depends only on the specified bits.  It can also
  861.      replace comparison operators with equivalent operations if they
  862.      cause the required bits to be set, even if the remaining bits are
  863.      undefined.  For example, on a machine whose comparison operators
  864.      return an `SImode' value and where `STORE_FLAG_VALUE' is defined as
  865.      `0x80000000', saying that just the sign bit is relevant, the
  866.      expression
  867.  
  868.           (ne:SI (and:SI X (const_int POWER-OF-2)) (const_int 0))
  869.  
  870.      can be converted to
  871.  
  872.           (ashift:SI X (const_int N))
  873.  
  874.      where N is the appropriate shift count to move the bit being
  875.      tested into the sign bit.
  876.  
  877.      There is no way to describe a machine that always sets the
  878.      low-order bit for a true value, but does not guarantee the value
  879.      of any other bits, but we do not know of any machine that has such
  880.      an instruction.  If you are trying to port GNU CC to such a
  881.      machine, include an instruction to perform a logical-and of the
  882.      result with 1 in the pattern for the comparison operators and let
  883.      us know (*note How to Report Bugs: Bug Reporting.).
  884.  
  885.      Often, a machine will have multiple instructions that obtain a
  886.      value from a comparison (or the condition codes).  Here are rules
  887.      to guide the choice of value for `STORE_FLAG_VALUE', and hence the
  888.      instructions to be used:
  889.  
  890.         * Use the shortest sequence that yields a valid definition for
  891.           `STORE_FLAG_VALUE'.  It is more efficient for the compiler to
  892.           "normalize" the value (convert it to, e.g., 1 or 0) than for
  893.           the comparison operators to do so because there may be
  894.           opportunities to combine the normalization with other
  895.           operations.
  896.  
  897.         * For equal-length sequences, use a value of 1 or -1, with -1
  898.           being slightly preferred on machines with expensive jumps and
  899.           1 preferred on other machines.
  900.  
  901.         * As a second choice, choose a value of `0x80000001' if
  902.           instructions exist that set both the sign and low-order bits
  903.           but do not define the others.
  904.  
  905.         * Otherwise, use a value of `0x80000000'.
  906.  
  907.      Many machines can produce both the value chosen for
  908.      `STORE_FLAG_VALUE' and its negation in the same number of
  909.      instructions.  On those machines, you should also define a pattern
  910.      for those cases, e.g., one matching
  911.  
  912.           (set A (neg:M (ne:M B C)))
  913.  
  914.      Some machines can also perform `and' or `plus' operations on
  915.      condition code values with less instructions than the corresponding
  916.      `sCOND' insn followed by `and' or `plus'.  On those machines,
  917.      define the appropriate patterns.  Use the names `incscc' and
  918.      `decscc', respectively, for the the patterns which perform `plus'
  919.      or `minus' operations on condition code values.  See `rs6000.md'
  920.      for some examples.  The GNU Superoptizer can be used to find such
  921.      instruction sequences on other machines.
  922.  
  923.      You need not define `STORE_FLAG_VALUE' if the machine has no
  924.      store-flag instructions.
  925.  
  926. `FLOAT_STORE_FLAG_VALUE'
  927.      A C expression that gives a non-zero floating point value that is
  928.      returned when comparison operators with floating-point results are
  929.      true.  Define this macro on machine that have comparison
  930.      operations that return floating-point values.  If there are no
  931.      such operations, do not define this macro.
  932.  
  933. `Pmode'
  934.      An alias for the machine mode for pointers.  Normally the
  935.      definition can be
  936.  
  937.           #define Pmode SImode
  938.  
  939. `FUNCTION_MODE'
  940.      An alias for the machine mode used for memory references to
  941.      functions being called, in `call' RTL expressions.  On most
  942.      machines this should be `QImode'.
  943.  
  944. `INTEGRATE_THRESHOLD (DECL)'
  945.      A C expression for the maximum number of instructions above which
  946.      the function DECL should not be inlined.  DECL is a
  947.      `FUNCTION_DECL' node.
  948.  
  949.      The default definition of this macro is 64 plus 8 times the number
  950.      of arguments that the function accepts.  Some people think a larger
  951.      threshold should be used on RISC machines.
  952.  
  953. `SCCS_DIRECTIVE'
  954.      Define this if the preprocessor should ignore `#sccs' directives
  955.      and print no error message.
  956.  
  957. `HANDLE_PRAGMA (STREAM)'
  958.      Define this macro if you want to implement any pragmas.  If
  959.      defined, it should be a C statement to be executed when `#pragma'
  960.      is seen.  The argument STREAM is the stdio input stream from which
  961.      the source text can be read.
  962.  
  963.      It is generally a bad idea to implement new uses of `#pragma'.  The
  964.      only reason to define this macro is for compatibility with other
  965.      compilers that do support `#pragma' for the sake of any user
  966.      programs which already use it.
  967.  
  968. `DOLLARS_IN_IDENTIFIERS'
  969.      Define this macro to control use of the character `$' in identifier
  970.      names.  The value should be 0, 1, or 2.  0 means `$' is not allowed
  971.      by default; 1 means it is allowed by default if `-traditional' is
  972.      used; 2 means it is allowed by default provided `-ansi' is not
  973.      used.  1 is the default; there is no need to define this macro in
  974.      that case.
  975.  
  976. `NO_DOLLAR_IN_LABEL'
  977.      Define this macro if the assembler does not accept the character
  978.      `$' in label names.  By default constructors and destructors in
  979.      G++ have `$' in the identifiers.  If this macro is defined, `.' is
  980.      used instead.
  981.  
  982. `DEFAULT_MAIN_RETURN'
  983.      Define this macro if the target system expects every program's
  984.      `main' function to return a standard "success" value by default
  985.      (if no other value is explicitly returned).
  986.  
  987.      The definition should be a C statement (sans semicolon) to
  988.      generate the appropriate rtl instructions.  It is used only when
  989.      compiling the end of `main'.
  990.  
  991. `HAVE_ATEXIT'
  992.      Define this if the target system supports the function `atexit'
  993.      from the ANSI C standard.  If this is not defined, and
  994.      `INIT_SECTION_ASM_OP' is not defined, a default `exit' function
  995.      will be provided to support C++.
  996.  
  997. `EXIT_BODY'
  998.      Define this if your `exit' function needs to do something besides
  999.      calling an external function `_cleanup' before terminating with
  1000.      `_exit'.  The `EXIT_BODY' macro is only needed if netiher
  1001.      `HAVE_ATEXIT' nor `INIT_SECTION_ASM_OP' are defined.
  1002.  
  1003. `INSN_SETS_ARE_DELAYED (INSN)'
  1004.      Define this macro as a C expression that is nonzero if it is safe
  1005.      for the delay slot scheduler to place instructions in the delay
  1006.      slot of INSN, even if they appear to use a resource set or
  1007.      clobbered in INSN.  INSN is always a `jump_insn' or an `insn'; GNU
  1008.      CC knows that every `call_insn' has this behavior.  On machines
  1009.      where some `insn' or `jump_insn' is really a function call and
  1010.      hence has this behavior, you should define this macro.
  1011.  
  1012.      You need not define this macro if it would always return zero.
  1013.  
  1014. `INSN_REFERENCES_ARE_DELAYED (INSN)'
  1015.      Define this macro as a C expression that is nonzero if it is safe
  1016.      for the delay slot scheduler to place instructions in the delay
  1017.      slot of INSN, even if they appear to set or clobber a resource
  1018.      referenced in INSN.  INSN is always a `jump_insn' or an `insn'.
  1019.      On machines where some `insn' or `jump_insn' is really a function
  1020.      call and its operands are registers whose use is actually in the
  1021.      subroutine it calls, you should define this macro.  Doing so
  1022.      allows the delay slot scheduler to move instructions which copy
  1023.      arguments into the argument registers into the delay slot of INSN.
  1024.  
  1025.      You need not define this macro if it would always return zero.
  1026.  
  1027. ə